<template>
  <div class="dashboard-editor-container">
    <div class=" clearfix">
      <div class="welcomeContent">
        <pan-thumb :image="avatar"> 用户名:
          <span class="pan-info-roles">{{roles}}</span>
        </pan-thumb>
      </div>
      <div class="info-container">
        <div class="display_name">{{platformName}}</div>
        <div class="display_welcome">欢迎 {{platformName}}</div>
      </div>
    </div>
    <!-- <div>
      <img class="emptyGif" :src="emptyGif">
    </div> -->
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import PanThumb from '@/components/PanThumb'
import GithubCorner from '@/components/GithubCorner'
import { getPlatformObj } from '@/api/crm/platform/index'

export default {
  name: 'dashboard-editor',
  components: { PanThumb, GithubCorner },
  data() {
    return {
      emptyGif: 'https://wpimg.wallstcn.com/0e03b7da-db9e-4819-ba10-9016ddfdaed3',
      platformName: 'flyray集团'
    }
  },
  computed: {
    ...mapGetters([
      'name',
      'avatar',
      'roles',
      'platformId'
    ])
  },
  created() {
    this.getPlatfromInfo()
  },
  methods: {
    getPlatfromInfo() {
      getPlatformObj(this.platformId)
        .then(response => {
          console.log('==========================================')
          console.log(response)
          this.platformName = response.platformBase.platformName
        })
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.welcomeContent{
  text-align: center;
  position: relative;
  height: 150px;
}
.info-container {
  position: relative;
  height: 150px;
  text-align: center;
}
.display_name {
  width: 100%;
  font-size: 48px;
  color: #212121;
  line-height: 100px;
  top: 25px;
  text-align: center;
}
.display_welcome {
  width: 100%;
  font-size: 20px;
  text-align: center;
}
.emptyGif {
  display: block;
  width: 45%;
  margin: 0 auto;
}

  .dashboard-editor-container {
    background-color: #ffffff;
    min-height: 100vh;
    padding: 50px 60px 0px;
    .pan-info-roles {
      font-size: 12px;
      font-weight: 700;
      color: #333;
      display: block;
    }
    
  }
</style>
